StreamTextResult

class StreamTextResult(sourceStream: Flow<StreamEvent>, val request: LanguageModelRequestMetadata = LanguageModelRequestMetadata(), initialResponse: LanguageModelResponseMetadata = LanguageModelResponseMetadata())

Constructors

Link copied to clipboard
constructor(sourceStream: Flow<StreamEvent>, request: LanguageModelRequestMetadata = LanguageModelRequestMetadata(), initialResponse: LanguageModelResponseMetadata = LanguageModelResponseMetadata())

Properties

Link copied to clipboard

Memoised replay of the upstream events. The upstream is collected at most once; later collectors replay the captured events. This differs from the cold top-level streamText, which drives a fresh upstream per collection. Capture commits only on successful completion, so a cancelled collection never memoises a truncated or duplicated replay.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val textStream: Flow<String>
Link copied to clipboard

Functions

Link copied to clipboard
fun toUiMessageStream(assistantMessageId: String): Flow<UIMessage>
Link copied to clipboard